home *** CD-ROM | disk | FTP | other *** search
File List | 1989-12-03 | 8.4 KB | 178 lines |
- Phar Lap Macro Assembler Version 2.2 Sun Dec 03 20:56:05 1989
-
- Page 1-1
-
-
- ; function to select banks on popular v
- ideo cards
- ;
- ; void SetBank(int device,int bank)
- ;
-
- = Device EQU dword ptr [ebp+8]
- = Bank EQU word ptr [ebp+12]
- = 00000000 TSENG EQU 0
- = 00000001 VIDEO7 EQU 1
- = 00000002 PARADISE EQU 2
-
- ASSUME ds:dseg,cs:cseg
-
- 00000000 dseg SEGMENT
- 00000000 00 curbk DB 0
- 00000001 dseg ends
-
- 00000000 cseg SEGMENT dword public 'CODE'
- public setbank
- 00000000 73 65 74 62 61 6E 6B 07 db 'setbank',7
- 00000008 setbank proc near ;64k bank number is
- in AX
- 00000008 55 push ebp
- 00000009 8B EC mov ebp,esp
- 0000000B 56 push esi
- 0000000C 57 push edi
-
- 0000000D 66| 8B 45 0C mov ax,Bank
- 00000011 66| 50 push ax
- 00000013 66| 52 push dx
- 00000015 FA cli
- 00000016 A2 00000000 R mov curbk,al
- 0000001B 83 7D 08 00 cmp Device,TSENG
- 0000001F 0F 85 0000001E jnz nots
- 00000025 24 07 and al,7 ;Tseng
- 00000027 8A E0 mov ah,al
- 00000029 D0 E4 shl ah,1
- 0000002B D0 E4 shl ah,1
- 0000002D D0 E4 shl ah,1
- 0000002F 0A C4 or al,ah
- 00000031 0C 40 or al,01000000b
- 00000033 66| BA 03CD mov dx,3cdh
- 00000037 EE out dx,al
- 00000038 FB sti
- 00000039 66| 5A pop dx
- 0000003B 66| 58 pop ax
- 0000003D 5F pop edi
- 0000003E 5E pop esi
- 0000003F 8B E5 mov esp,ebp
- 00000041 5D pop ebp
- 00000042 C3 ret
-
- 00000043 83 7D 08 01 nots: cmp Device,VIDEO7
- Phar Lap Macro Assembler Version 2.2 Sun Dec 03 20:56:05 1989
-
- Page 1-2
-
-
- 00000047 0F 85 00000057 jnz nov7
- 0000004D 66| 25 000F and ax,15 ;Video 7
- 00000051 66| 51 push cx
- 00000053 8A E8 mov ch,al
- 00000055 66| BA 03C4 mov dx,3c4h
- 00000059 66| B8 EA06 mov ax,0ea06h
- 0000005D 66| EF out dx,ax
- 0000005F 8A E5 mov ah,ch
- 00000061 80 E4 01 and ah,1
- 00000064 B0 F9 mov al,0f9h
- 00000066 66| EF out dx,ax
- 00000068 8A C5 mov al,ch
- 0000006A 24 0C and al,1100b
- 0000006C 8A E0 mov ah,al
- 0000006E D0 EC shr ah,1
- 00000070 D0 EC shr ah,1
- 00000072 0A E0 or ah,al
- 00000074 B0 F6 mov al,0f6h
- 00000076 EE out dx,al
- 00000077 66| 42 inc dx
- 00000079 EC in al,dx
- 0000007A 66| 4A dec dx
- 0000007C 24 F0 and al,not 1111b
- 0000007E 0A E0 or ah,al
- 00000080 B0 F6 mov al,0f6h
- 00000082 66| EF out dx,ax
- 00000084 8A E5 mov ah,ch
- 00000086 B1 04 mov cl,4
- 00000088 D2 E4 shl ah,cl
- 0000008A 80 E4 20 and ah,100000b
- 0000008D B2 CC mov dl,0cch
- 0000008F EC in al,dx
- 00000090 B2 C2 mov dl,0c2h
- 00000092 24 DF and al,not 100000b
- 00000094 0A C4 or al,ah
- 00000096 EE out dx,al
- 00000097 FB sti
- 00000098 66| 59 pop cx
- 0000009A 66| 5A pop dx
- 0000009C 66| 58 pop ax
- 0000009E 5F pop edi
- 0000009F 5E pop esi
- 000000A0 8B E5 mov esp,ebp
- 000000A2 5D pop ebp
- 000000A3 C3 ret
-
- 000000A4 83 7D 08 02 nov7: cmp Device,PARADISE
- 000000A8 0F 85 0000001C jnz nopd
- 000000AE 66| BA 03CE mov dx,3ceh ;Paradise
- 000000B2 66| B8 050F mov ax,50fh ;turn off write protect o
- n VGA registers
- 000000B6 66| EF out dx,ax
- 000000B8 8A 25 00000000 R mov ah,curbk
- 000000BE D0 E4 shl ah,1
- Phar Lap Macro Assembler Version 2.2 Sun Dec 03 20:56:05 1989
-
- Page 1-3
-
-
- 000000C0 D0 E4 shl ah,1
- 000000C2 D0 E4 shl ah,1
- 000000C4 D0 E4 shl ah,1
- 000000C6 B0 09 mov al,9
- 000000C8 66| EF out dx,ax
-
- 000000CA FB nopd: sti
- 000000CB 66| 5A pop dx
- 000000CD 66| 58 pop ax
- 000000CF 5F pop edi
- 000000D0 5E pop esi
- 000000D1 8B E5 mov esp,ebp
- 000000D3 5D pop ebp
- 000000D4 C3 ret
- setbank endp
- 000000D5 cseg ends
- end
- Phar Lap Macro Assembler Version 2.2 Sun Dec 03 20:56:05 1989
-
- Symbols-1
-
-
- GROUPS AND SEGMENTS
- Name Size Use Align Combine Class
-
- cseg . . . . . . . . . . . . . . 000000D5 USE32 DWORD PUBLIC CODE
- dseg . . . . . . . . . . . . . . 00000001 USE32 PARA NONE
-
- PROCEDURES
- Name Type Offset Scope Segment
-
- setbank . . . . . . . . . . . . N PROC 00000008 Public cseg
-
- VARIABLES AND LABELS
- Name Type Offset Scope Segment
-
- curbk . . . . . . . . . . . . . BYTE 00000000 Prvate dseg
- nopd . . . . . . . . . . . . . . N LABEL 000000CA Prvate cseg
- nots . . . . . . . . . . . . . . N LABEL 00000043 Prvate cseg
- nov7 . . . . . . . . . . . . . . N LABEL 000000A4 Prvate cseg
-
- CONSTANTS
- Name Type Value
-
- Bank . . . . . . . . . . . . . . Text word ptr [ebp+12]
- Device . . . . . . . . . . . . . Text dword ptr [ebp+8]
- PARADISE . . . . . . . . . . . . Integer 00000002
- TSENG . . . . . . . . . . . . . Integer 00000000
- VIDEO7 . . . . . . . . . . . . . Integer 00000001
-
-
- 12 Symbols
- 0 Warning Errors
- 0 Severe Errors
-